package utils

import (
	"github.com/k0kubun/pp"
	"runtime"
)

func GetFuncName() string {
	pc, _, _, _ := runtime.Caller(1)
	return runtime.FuncForPC(pc).Name()
}

func GetCallerName() string {
	pc, _, _, _ := runtime.Caller(2)
	return runtime.FuncForPC(pc).Name()
}

func Println(a ...interface{}) {
	_, _ = pp.Println(GetCallerName(), a)
}

func Printf(format string, a ...interface{}) {
	_, _ = pp.Printf(GetCallerName(), format, a)
}
